#include "logging.hpp"


ofstream GLOB_LOG_STREAM;

void init_logging(void){
	
	
	time_t *timer=new time_t; 
	struct tm *loc=new struct tm; 
	stringstream s;
	string mule;
	
	time(timer); 
	loc=localtime(timer);
	
	s	<< "./logs/"
		<< setfill('0') 
		<< setw(4) << loc->tm_year+1900
	 	<< setw(2) << loc->tm_mon+1
		<< setw(2) << loc->tm_mday
		<< "log.txt"; 
	
	mule = s.str();
	 
	GLOB_LOG_STREAM.open(mule.c_str(),ios_base::app);
	log("Application booted");
	log("Log Init Complete");
}
